package com.lkm.market2_0.push;

import android.content.Context;

import com.lkm.market2_0.MyApplication;
import com.lkm.market2_0.m.appserver.AppMainModule;
import com.lkm.market2_0.m.steelyardserver.SteelyardServerModule;
import com.mj.hx.yl.push.PushHandle;

import java.lang.reflect.Type;

/**
 * 推送设置台秤为维修状态
 * Created by lkm on 18/1/11.
 */
public class PushSetSteelyardRepairingHandle implements PushHandle<String>{
    @Override
    public Type getDataClass() {
        return String.class;
    }

    @Override
    public boolean handler(Context context, String steelyardMac) {

        SteelyardServerModule mSteelyardServerModule= MyApplication.getInstance().getModuleManager().loadModule(SteelyardServerModule.class);

        if(mSteelyardServerModule!=null){
            mSteelyardServerModule.setSteelyardRepairing(steelyardMac);
        }
        return true;
    }
}
